import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'
const LoginDeptAuth = 'Login-Dept-Auth'
const LoginDeptName = 'Login-Dept-Name'
const LoginDeptParentAuth = 'Login-Dept-Parent-Auth'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

//LoginDeptAuth 机构id
export function setLoginDeptAuth(deptAuth) {
  return Cookies.set(LoginDeptAuth, deptAuth)
}

export function getLoginDeptAuth() {
  return Cookies.get(LoginDeptAuth)
}

export function removeLoginDeptAuth() {
  return Cookies.remove(LoginDeptAuth)
}

export function setLoginDeptName(deptName) {
  return Cookies.set(LoginDeptName, deptName)
}

export function getLoginDeptName() {
  return Cookies.get(LoginDeptName)
}

export function removeLoginDeptName() {
  return Cookies.remove(LoginDeptName)
}

// LoginDeptParentAuth 机构父id
export function setLoginDeptParentAuth(deptParentAuth) {
  return Cookies.set(LoginDeptParentAuth, deptParentAuth)
}

export function getLoginDeptParentAuth() {
  return Cookies.get(LoginDeptParentAuth)
}

export function removeLoginDeptParentAuth() {
  return Cookies.remove(LoginDeptParentAuth)
}